import requests
while True:
    url = 'https://www.baidu.com/s?'
    text = input('请输入搜索内容（输入退出，退出此程序）:\n')
    if text == '退出':
        break
    params = {'wd': text}
    headers = {
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36"}

    respones = requests.get(url, headers=headers, params=params)
    # print(respones.content.decode())
    print(respones.url)
